<?php
/**
 * Created by JetBrains PhpStorm.
 * User: khathirdstep1025
 * Date: 9/26/12
 * Time: 9:54 PM
 * To change this template use File | Settings | File Templates.
 */

class Pages extends CI_Controller{

    public function __construct(){
        parent::__construct();
    }

    public function view($page = 'home'){
        if (!file_exists('application/views/pages/' . $page . '.php')){
            show_404();
        }

        $data['title'] = ucfirst($page);

        $this->parser->parse('template/header', $data);
        $this->parser->parse('pages/'. $page, $data);
        $this->parser->parse('template/footer', $data);
    }
}